# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-other
pkgname=pulseaudio-qt
pkgver=1.3
pkgrel=3
arch="all !armhf" # armhf blocked by qt5-qtdeclarative
url="https://invent.kde.org/libraries/pulseaudio-qt"
pkgdesc="Pulseaudio bindings for Qt"
license="LGPL-2.1-only OR LGPL-3.0-only"
depends_dev="
	glib-dev
	pulseaudio-dev
	qt5-qtbase-dev
	qt5-qtdeclarative-dev
	"
makedepends="$depends_dev
	doxygen
	extra-cmake-modules
	graphviz
	qt5-qttools-dev
	samurai
	"
_repo_url="https://invent.kde.org/libraries/pulseaudio-qt.git"
source="https://download.kde.org/stable/pulseaudio-qt/pulseaudio-qt-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-doc"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_QCH=ON
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
2326277fd37327db29a5984056949fcf935c36e7b39184d1307a5d0a891efed4f0e4f32e783f3f7da2c7e6b7409eb908b2521064c6d24a28561ed38db9f8d4e8  pulseaudio-qt-1.3.tar.xz
"
